package com.victor.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.victor.dao.ToreportDao;
import com.victor.entity.toreport.FrozenContent;
import com.victor.entity.toreport.ToReport;
import com.victor.service.ToreportService;
@Service
public class ToreportServiceImpl implements ToreportService{
	@Autowired
	private ToreportDao dao;

	@Override
	public String selByFromuid(String uid) {
		return dao.selByFromuid(uid);
	}

	@Override
	public String selByTouid(String uid) {
		return dao.selByTouid(uid);
	}

	@Override
	public String selByFromuidAndDelstate(String uid) {
		return dao.selByFromuidAndDelstate(uid);
	}

	@Override
	public PageInfo<ToReport> selwrongInfo(String uid,int page,int row) {
		PageHelper.startPage(page, row);
		List<ToReport> list = dao.selWrongInfo(uid);
		return new PageInfo<>(list, 5);
	}

	@Override
	public ToReport selById(String id) {
		return dao.selById(id);
	}

	@Override
	public boolean updateByTypeAndCid(ToReport toReport) {
		return dao.updateByTypeAndCid(toReport);
	}

	@Override
	public boolean insertFrozenContent(FrozenContent frozenContent) {
		return dao.insertFrozenContent(frozenContent);
	}


	

}
